
package com.hc.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;


@Entity
@Table(name="account")
public class Account implements Serializable{
	
	/**
	 * 自增用户id
	 */
	@Id
	@GenericGenerator(name = "generator", strategy = "identity")
	@GeneratedValue(generator = "generator", strategy = GenerationType.IDENTITY)
	private int userId;
	
	private String nickName;
	
	private String realName;
	
	private String identificationNumber;
	
	private String tel;
	
	private String pass;
	
	private String salt;
	
	private int loginCount;
	
	private String lastLoginIp;
	
	private String lastLoginDate;
	
	private String addDate;
	
	private int isVerified = 0;

	private int status = 1;
	@Column(name = "userId", nullable = false,columnDefinition="用户id，自增")
	public int getUserId() {
	
		return userId;
	}

	public void setUserId(int userId) {
	
		this.userId = userId;
	}
	@Column(name = "nickName", nullable = false,columnDefinition="用户昵称")
	public String getNickName() {
	
		return nickName;
	}

	public void setNickName(String nickName) {
	
		this.nickName = nickName;
	}
	@Column(name = "realName", nullable = true,columnDefinition="用户真实姓名")
	public String getRealName() {
	
		return realName;
	}

	public void setRealName(String realName) {
	
		this.realName = realName;
	}
	@Column(name = "identificationNumber", nullable = true,columnDefinition="用户身份证号码")
	public String getIdentificationNumber() {
	
		return identificationNumber;
	}

	public void setIdentificationNumber(String identificationNumber) {
	
		this.identificationNumber = identificationNumber;
	}
	@Column(name = "tel", nullable = false,columnDefinition="用户手机号，登录时作为账号")
	public String getTel() {
	
		return tel;
	}

	public void setTel(String tel) {
	
		this.tel = tel;
	}
	@Column(name = "pass", nullable = false,columnDefinition="密码")
	public String getPass() {
	
		return pass;
	}

	public void setPass(String pass) {
	
		this.pass = pass;
	}
	@Column(name = "salt", nullable = false,columnDefinition="密码加密时的盐值")
	public String getSalt() {
	
		return salt;
	}

	public void setSalt(String salt) {
	
		this.salt = salt;
	}
	@Column(name = "loginCount", nullable = false,columnDefinition="登录次数")
	public int getLoginCount() {
	
		return loginCount;
	}

	public void setLoginCount(int loginCount) {
	
		this.loginCount = loginCount;
	}
	@Column(name = "lastLoginIp", nullable = false,columnDefinition="comment '最后一次登录IP地址'")
	public String getLastLoginIp() {
	
		return lastLoginIp;
	}

	public void setLastLoginIp(String lastLoginIp) {
	
		this.lastLoginIp = lastLoginIp;
	}
	@Column(name = "lastLoginDate", nullable = false,columnDefinition="最后一次登录时间")
	public String getLastLoginDate() {
	
		return lastLoginDate;
	}

	public void setLastLoginDate(String lastLoginDate) {
	
		this.lastLoginDate = lastLoginDate;
	}
	@Column(name = "addDate", nullable = false,columnDefinition="注册时间")
	public String getAddDate() {
	
		return addDate;
	}

	public void setAddDate(String addDate) {
	
		this.addDate = addDate;
	}
	
	@Column(name = "isVerified", nullable = false,columnDefinition="注册时间")
	public int getIsVerified() {
	
		return isVerified;
	}

	public void setIsVerified(int isVerified) {
	
		this.isVerified = isVerified;
	}

	@Column(name = "status", nullable = false,columnDefinition="状态码默认1：正常")
	public int getStatus() {
	
		return status;
	}

	public void setStatus(int status) {
	
		this.status = status;
	}

	@Override
	public String toString() {
		return "Account [userId=" + userId + ", nickName=" + nickName + ", realName=" + realName
				+ ", identificationNumber=" + identificationNumber + ", tel=" + tel + ", pass=" + pass + ", salt="
				+ salt + ", loginCount=" + loginCount + ", lastLoginIp=" + lastLoginIp + ", lastLoginDate="
				+ lastLoginDate + ", addDate=" + addDate + ", status=" + status + "]";
	}
	
	
}

